package cloud.xlh.digital_power_pay.intergration.order.adapter;


import cloud.xlh.digital_power_pay.client.order.dto.OrderDTO;
import cloud.xlh.digital_power_pay.domian.order.OrderSaveDomain;
import cloud.xlh.infrastructure.utils.CommonUtil;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/8/12 18:10
 * @ Description:
 */
@Component
public class OrderClientAdapter {
    public OrderSaveDomain convertOrderSaveDomain(OrderDTO orderDTO) {
        OrderSaveDomain orderSaveDomain = new OrderSaveDomain();
        CommonUtil.copyPropertiesIgnoreCase(orderDTO , orderSaveDomain);
        return orderSaveDomain;
    }
}
